@import "../MsfsAvionicsCommon/definitions";
@import "../MsfsAvionicsCommon/gauges";
@import "../MFD/pages/common/widget-style.scss"; // Re-use MFD widget style

@mixin Blink10SecondsFill($color) {
    @keyframes pulsing {
        100% {
            fill: $color;
        }
        51% {
            fill: $color;
        }
        50% {
            fill: scale-color($color, $lightness: -50%);
        }
        1% {
            fill: scale-color($color, $lightness: -50%);
        }
    }

    animation: pulsing 1s 10;
}

@font-face {
    font-family: "Ecam";
    //noinspection CssUnknownTarget
    src: url("/Fonts/fbw-a380x/FBW-Display-EIS-A380.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

.ewd-svg {
    position: absolute;
    width: 768px;
    background: $display-background;
    font-family: "Ecam", monospace;
}

.HiddenElement {
    display: none;
}

.Invisible {
  visibility: hidden;
}

.EWDWarningTextLeft {
    fill: white;
    font-size: 1.55em;
    letter-spacing: 0.047em;
}

tspan {
  white-space: pre;
}

.XSmall, .F19 {
    font-size: 19px !important;
}

.Small, .F21 {
    font-size: 21px !important;
}

.Medium, .F22 {
    font-size: 22px !important;
}

.Large, .F23 {
    font-size: 23px !important;
}

.VLarge, .F24 {
    font-size: 24px !important;
}

.F25 {
    font-size: 25px !important;
}

.F26 {
    font-size: 26px !important;
}

.XLarge, .F27 {
    font-size: 27px !important;
}

.F28 {
    font-size: 28px !important;
}

.F29 {
    font-size: 29px !important;
}

.Huge, .F30 {
    font-size: 30px !important;
}

.F32 {
    font-size: 32px !important;
}

.F34 {
    font-size: 34px !important;
}

.F35 {
    font-size: 35px !important;
}

.F36 {
    font-size: 36px !important;
}

text, tspan, span {
    stroke: none !important;

    &.EWDWarn {
        font-size: 24px;
        letter-spacing: 1.75px;
    }

    &.Cyan {
        fill: $display-cyan !important;
    }

    &.Green {
        fill: $display-green !important;
    }

    &.Amber {
        fill: $display-amber;
    }

    &.Red {
        fill: $display-red;
    }

    &.Magenta {
        fill: $display-magenta;
    }

    &.Center {
        text-anchor: middle !important;
    }

    &.End {
        text-anchor: end !important;
    }

    &.IdleTextPulse {
        @include Blink10SecondsFill($display-green);
    }

    &.Underline {
        text-decoration: underline;
        text-decoration-color: $display-amber;
    }
}

.Separator {
  stroke: $display-light-grey;
  stroke-width: 3;
  fill: none;
}

.SeparatorMemo {
    stroke: $display-light-grey;
    stroke-width: 2;
    fill: none;
  }

.AmberLine {
    stroke: $display-amber !important;
    stroke-width: 2;
    fill: none;
}

.GreenLine {
    stroke: $display-green !important;
    stroke-width: 2;
    fill: none;
}

.WhiteLine {
    stroke: $display-white !important;
    stroke-width: 2;
    fill: none;
}

.RedLine {
    stroke: $display-red !important;
    stroke-width: 2;
    fill: none;
}

.ThickRedLine {
    stroke: $display-red !important;
    stroke-width: 6 !important;
    fill: $display-red;
}

.LightGreyLine {
    stroke: $display-light-grey !important;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
}


.BackgroundLine {
    stroke: $display-background !important;
    stroke-width: 2;
    fill: $display-background;
}

.BackgroundFill {
    fill: $display-background !important;
}

.Show {
    display:block;
}

.Hide {
    display: none;
}

.Spread {
    letter-spacing: 1.6px;
}

.DonutThrottleIndicator {
    fill: none;
    stroke-width: 2px;
    stroke: $display-cyan;
}


.DarkGreyBox {
    stroke: $display-grey;
    fill: none;
    stroke-width: 2;
}

.AmberBox {
    stroke: $display-amber;
    fill: none;
    stroke-width: 2;
}

.LightGreyBox {
    stroke: none;
    fill: $display-light-grey;
    opacity: 0.2
}

.ewd-main {
    position: absolute;
    width: 768px;
    height: 1024px;
    /* 1:1.33 W:H  */
    background: $display-background;
    font-family: "Ecam", monospace !important;
    display: flex;
    flex-direction: column;
}

.EngineDisplayArea {
    display: flex;
    height: 379px;
    margin: 0px 8px 0px 8px;
    border-bottom: 4px solid $display-light-grey;
}

.WarningDisplayArea {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0px 8px 0px 8px;
}

.VerticalFill {
    display: flex;
    flex-grow: 1;
}

.StsArea {
  height: 40px;
}

.FailurePendingBox {
  display: inline;
  position: relative;
  left: 40px;
  top: 4px;
  border: 2px outset $display-white;
  font-size: 24px;
  padding: 2px;
}

.StsBox {
  display: inline;
  position: relative;
  left: 150px;
  top: 4px;
  border: 2px outset $display-white;
  font-size: 24px;
  padding: 2px;
}

.AdvBox {
  display: inline;
  position: relative;
  left: 360px;
  top: 4px;
  border: 2px outset $display-white;
  font-size: 24px;
  padding: 2px;
}

.WdNotAvailArea {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.MemosContainer {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 0px 12px 0px;
}

.LimitationsContainer {
  display: flex;
  flex-direction: column;
  padding: 12px 0px 12px 0px;
  border-bottom: 2px solid $display-light-grey;
}

.MemosDividedArea {
  width: 100%;
  display: flex;
  flex-direction: row;
  padding-bottom: 4px;
}

.MemosLeft {
  display: flex;
  flex-direction: column;
  flex: 1;
  border-right: 2px solid lightgrey;
}

.MemosRight {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-left: 8px;
}

.FillArea {
  flex-grow: 1;
}

.LimitationsHeading {
  display: flex;
  justify-content: center;
  font-size: 24px;
  letter-spacing: 1.75px;
  margin-bottom: 4px;
}

.LimitationsHeading.Underline {
  text-decoration: underline;
}

.ProceduresContainer {
  display: flex;
  flex-direction: row;
}

.OverflowIndicatorColumn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  padding: 50px 0px 12px 0px;
}

.WarningsColumn {
  display: flex;
  flex-direction: column;
  padding: 12px 0px 15px 0px;
  height: 100%;
  flex: 1;
}

.EclLine {
  display: flex;
  flex-direction: row;
  flex: 1;
  margin-left: 10px;
  align-items: center;
  border: 3px solid transparent;
  color: $display-cyan;
}

.EclLine.ChecklistItem {
  color: $display-cyan;
}

.EclLine.ChecklistItem.Checked {
  color: $display-green;
}

.EclLine.AbnormalItem {
  color: $display-cyan;
}

.EclLine.AbnormalItem.Checked {
  color: $display-white;
}

.EclLine.Inactive {
  color: $display-grey !important;
}

.EclLine.ChecklistCompleted {
  color: $display-grey !important;
}

.EclLine.DeferredProcedure {
  color: $display-amber;
}

.EclLine.CompletedDeferredProcedure {
  color: $display-white;
}

.EclLine.Underline {
  text-decoration: underline;
}

.EclLine.Centered {
  justify-content: center;
}

.EclLine.Green {
  color: $display-green;
}

.EclLine.Cyan {
  color: $display-cyan;
}

.EclLine.Amber {
  color: $display-amber;
}

.EclLine.White {
  color: $display-white;
}

.EclLine.Selected {
  border: 3px solid $display-cyan;
  border-right: 3px solid transparent;
}

.EclLine.Headline {
  color: $display-white;
  text-decoration: underline;
}

.EclLine.ChecklistCondition {
  color: $display-white;
}

.EclLine.OmissionDots {
  color: $display-white;
}

.EclLine.LandAnsa {
  color: $display-amber;
  justify-content: flex-end;
}

.EclLine.LandAsap {
  color: $display-red;
  justify-content: flex-end;
}

.EclLineCheckboxArea {
  text-align: center;
  justify-content: center;
  align-items: center;
  width: 24px;
  font-size: 26px;
  margin-right: 20px;
}

.EclLineCheckboxArea.Checked {
  color: $display-green;
}


.EclLineCheckboxArea.AbnormalItem.Checked {
  color: $display-white;
}

.EclLineCheckboxArea.ChecklistCondition {
  color: $display-white;
}

.EclLineCheckboxArea.AbnormalItem.Inactive {
  color: $display-grey !important;
}

.EclLineText {
  font-size: 26px;
}

.EclLineText.smaller {
  font-size: 24px;
}

.EclSeparationLine {
  flex: 1;
  border-bottom: 2px solid $display-white;
  padding-top: 14px;
  margin-bottom: 14px;
  align-self: center;
  justify-self: center;
  margin-right: 10px;
}

.EclLineContainer {
  height: 34px;
  display: flex;
  visibility: visible;
  flex-direction: row;
  flex: 1;
}

.EclLineContainer.smaller {
  height: 30px;
}

.EclLineContainer.invisible {
  visibility: hidden;
}

.EclLineEndMarker {
  content: ' ';
  width: 28px;
  height: 34px;
  border-right: 3px solid $display-white;
  border-left: 3px solid $display-white;
  margin-left: -5px;
}

.EclLineEndMarker.Selected {
  border-left: 3px solid transparent;
}

.EclLineEndMarker.First {
  border-top: 3px solid $display-white;
}

.EclLineEndMarker.Last {
  border-bottom: 3px solid $display-white;
}

.EclSoftKeys {
  position: absolute;
  top: 965px;
  right: 3px;
  display: flex;
  flex-direction: row;
}
